Optimal. Leaf size=67 \[ \frac {3 \cos (a) \text {CosIntegral}\left (b x^n\right )}{4 n}+\frac {\cos (3 a) \text {CosIntegral}\left (3 b x^n\right )}{4 n}-\frac {3 \sin (a) \text {Si}\left (b x^n\right )}{4 n}-\frac {\sin (3 a) \text {Si}\left (3 b x^n\right )}{4 n} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 67, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 4, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3507, 3459,
3457, 3456} \begin {gather*} \frac {3 \cos (a) \text {CosIntegral}\left (b x^n\right )}{4 n}+\frac {\cos (3 a) \text {CosIntegral}\left (3 b x^n\right )}{4 n}-\frac {3 \sin (a) \text {Si}\left (b x^n\right )}{4 n}-\frac {\sin (3 a) \text {Si}\left (3 b x^n\right )}{4 n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3456
Rule 3457
Rule 3459
Rule 3507
Rubi steps
\begin {align*} \int \frac {\cos ^3\left (a+b x^n\right )}{x} \, dx &=\int \left (\frac {3 \cos \left (a+b x^n\right )}{4 x}+\frac {\cos \left (3 a+3 b x^n\right )}{4 x}\right ) \, dx\\ &=\frac {1}{4} \int \frac {\cos \left (3 a+3 b x^n\right )}{x} \, dx+\frac {3}{4} \int \frac {\cos \left (a+b x^n\right )}{x} \, dx\\ &=\frac {1}{4} (3 \cos (a)) \int \frac {\cos \left (b x^n\right )}{x} \, dx+\frac {1}{4} \cos (3 a) \int \frac {\cos \left (3 b x^n\right )}{x} \, dx-\frac {1}{4} (3 \sin (a)) \int \frac {\sin \left (b x^n\right )}{x} \, dx-\frac {1}{4} \sin (3 a) \int \frac {\sin \left (3 b x^n\right )}{x} \, dx\\ &=\frac {3 \cos (a) \text {Ci}\left (b x^n\right )}{4 n}+\frac {\cos (3 a) \text {Ci}\left (3 b x^n\right )}{4 n}-\frac {3 \sin (a) \text {Si}\left (b x^n\right )}{4 n}-\frac {\sin (3 a) \text {Si}\left (3 b x^n\right )}{4 n}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.12, size = 53, normalized size = 0.79 \begin {gather*} \frac {3 \cos (a) \text {CosIntegral}\left (b x^n\right )+\cos (3 a) \text {CosIntegral}\left (3 b x^n\right )-3 \sin (a) \text {Si}\left (b x^n\right )-\sin (3 a) \text {Si}\left (3 b x^n\right )}{4 n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.10, size = 52, normalized size = 0.78
method | result | size |
derivativedivides | \(\frac {-\frac {\sinIntegral \left (3 b \,x^{n}\right ) \sin \left (3 a \right )}{4}+\frac {\cosineIntegral \left (3 b \,x^{n}\right ) \cos \left (3 a \right )}{4}-\frac {3 \sinIntegral \left (b \,x^{n}\right ) \sin \left (a \right )}{4}+\frac {3 \cosineIntegral \left (b \,x^{n}\right ) \cos \left (a \right )}{4}}{n}\) | \(52\) |
default | \(\frac {-\frac {\sinIntegral \left (3 b \,x^{n}\right ) \sin \left (3 a \right )}{4}+\frac {\cosineIntegral \left (3 b \,x^{n}\right ) \cos \left (3 a \right )}{4}-\frac {3 \sinIntegral \left (b \,x^{n}\right ) \sin \left (a \right )}{4}+\frac {3 \cosineIntegral \left (b \,x^{n}\right ) \cos \left (a \right )}{4}}{n}\) | \(52\) |
risch | \(\frac {i {\mathrm e}^{-3 i a} \pi \,\mathrm {csgn}\left (b \,x^{n}\right )}{8 n}-\frac {i {\mathrm e}^{-3 i a} \sinIntegral \left (3 b \,x^{n}\right )}{4 n}-\frac {{\mathrm e}^{-3 i a} \expIntegral \left (1, -3 i b \,x^{n}\right )}{8 n}+\frac {3 i {\mathrm e}^{-i a} \pi \,\mathrm {csgn}\left (b \,x^{n}\right )}{8 n}-\frac {3 i {\mathrm e}^{-i a} \sinIntegral \left (b \,x^{n}\right )}{4 n}-\frac {3 \,{\mathrm e}^{-i a} \expIntegral \left (1, -i b \,x^{n}\right )}{8 n}-\frac {{\mathrm e}^{3 i a} \expIntegral \left (1, -3 i b \,x^{n}\right )}{8 n}-\frac {3 \,{\mathrm e}^{i a} \expIntegral \left (1, -i b \,x^{n}\right )}{8 n}\) | \(149\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.51, size = 180, normalized size = 2.69 \begin {gather*} \frac {{\left ({\rm Ei}\left (3 i \, b x^{n}\right ) + {\rm Ei}\left (-3 i \, b x^{n}\right ) + {\rm Ei}\left (3 i \, b e^{\left (n \overline {\log \left (x\right )}\right )}\right ) + {\rm Ei}\left (-3 i \, b e^{\left (n \overline {\log \left (x\right )}\right )}\right )\right )} \cos \left (3 \, a\right ) + 3 \, {\left ({\rm Ei}\left (i \, b x^{n}\right ) + {\rm Ei}\left (-i \, b x^{n}\right ) + {\rm Ei}\left (i \, b e^{\left (n \overline {\log \left (x\right )}\right )}\right ) + {\rm Ei}\left (-i \, b e^{\left (n \overline {\log \left (x\right )}\right )}\right )\right )} \cos \left (a\right ) + {\left (i \, {\rm Ei}\left (3 i \, b x^{n}\right ) - i \, {\rm Ei}\left (-3 i \, b x^{n}\right ) + i \, {\rm Ei}\left (3 i \, b e^{\left (n \overline {\log \left (x\right )}\right )}\right ) - i \, {\rm Ei}\left (-3 i \, b e^{\left (n \overline {\log \left (x\right )}\right )}\right )\right )} \sin \left (3 \, a\right ) - 3 \, {\left (-i \, {\rm Ei}\left (i \, b x^{n}\right ) + i \, {\rm Ei}\left (-i \, b x^{n}\right ) - i \, {\rm Ei}\left (i \, b e^{\left (n \overline {\log \left (x\right )}\right )}\right ) + i \, {\rm Ei}\left (-i \, b e^{\left (n \overline {\log \left (x\right )}\right )}\right )\right )} \sin \left (a\right )}{16 \, n} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 74, normalized size = 1.10 \begin {gather*} \frac {\cos \left (3 \, a\right ) \operatorname {Ci}\left (3 \, b x^{n}\right ) + 3 \, \cos \left (a\right ) \operatorname {Ci}\left (b x^{n}\right ) + 3 \, \cos \left (a\right ) \operatorname {Ci}\left (-b x^{n}\right ) + \cos \left (3 \, a\right ) \operatorname {Ci}\left (-3 \, b x^{n}\right ) - 2 \, \sin \left (3 \, a\right ) \operatorname {Si}\left (3 \, b x^{n}\right ) - 6 \, \sin \left (a\right ) \operatorname {Si}\left (b x^{n}\right )}{8 \, n} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\cos ^{3}{\left (a + b x^{n} \right )}}{x}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\cos \left (a+b\,x^n\right )}^3}{x} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________